<?php
/**
 * 
 * Modelo de De envio de mail
 * 
 */
class SendMailC24h extends Model
{
       private $_dataArray = array();
	
       public function __construct()
       {
           parent::Model();
           $this->load->database();
       }
       
       public function setDataMail($dataArray)
       {
          $this->_dataArray = $dataArray;
          return $this->_getDataCompany();
       }
       
       
       /**
        * @return array Objeto
        */
       private function _getDataCompany()
       {
          $arrayObjeto = $this->mcompania->loadCompaniasArray($this->_dataArray);
          
          $dataObjeto = new ArrayObject();
          
          foreach ($arrayObjeto as $k){

          	    $array = array($k->getIdCompania(),
                                   $k->getNombreCompania(),
                                   $k->getEmailCompania(),
                                   $k->getContacto());
                              
               $dataObjeto->append($array);            
          }
          
          return $dataObjeto;
       }
}